// Changes the security setting.
ApplicationSecurity.builder()
.adminClass(this.getClass())
.add(new RuntimePermission("exitJVM.2"))
.apply();
try {
System.exit(2);
}
// Changes the security setting.
admin.set(new RuntimePermission("exitJVM.2"));
try {
System.exit(2);